# -*- encoding:UTF-8 -*-
# author            : mengy
# date              : 2018/12/7
# python-version    : Python 3.7.0
# description       : 渲染色彩

def colored(color, text):
    table = {
        'red': '\033[91m',
        'green': '\033[92m',
        'nc': '\033[0m'
    }
    cv = table.get(color)
    nc = table.get('nc')
    return ''.join([cv, text, nc])
